<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <!-- 绑定textare -->
        <textarea id="" cols="30" rows="10" v-model="content"></textarea>
        <p>输入的内容：{{content}}</p>
        <!-- 绑定单选框checkbox -->
        <label for="agree">
            <input id="agree" type="checkbox" v-model="isagree">同意协议
        </label>
        {{isagree}}
        <!-- 绑定多选框 绑定的属性值是araay,将input的value添加到数组中 -->  
        <div class="musices">
            <h2>请选择你喜欢的音乐</h2>
            <label for="music1">
                <input id="music1" type="checkbox" v-model="musices" value="晴天">晴天
            </label>
            <label for="music2">
                <input id="music2" type="checkbox" v-model="musices" value="稻香">稻香
            </label>
            <label for="music3">
                <input id="music3" type="checkbox" v-model="musices" value="七里香">七里香
            </label>
        </div>
        <p>
            你喜欢的音乐是{{musices}}
        </p>
        <!-- 绑定radio -->
        <div class="gender">
            <label for="male">
                <input id="male" type="radio" v-model="gender" value="male">男
            </label>
            <label for="female">
                <input id="female" type="radio" v-model="gender" value="female">女
            </label>
        </div>
        <p>
            性别：{{gender}}
        </p>
        <!-- 绑定select的单选 -->
        <select v-model="movie">
            <option value="你的名字">你的名字</option>
            <option value="天气之子">天气之子</option>
            <option value="玲芽之旅">玲芽之旅</option>
        </select>
        <p>单选：{{movie}}</p>
        <br>
        <!-- 绑定select的多选 -->
        <select multiple size="2" v-model="movies">
            <option value="你的名字">你的名字</option>
            <option value="天气之子">天气之子</option>
            <option value="玲芽之旅">玲芽之旅</option>
        </select>
        <p>多选:{{movies}}</p>
    </div>
    <script src="https://unpkg.com/vue@next"></script>
    <script>
        //用vue创建app
        const app = Vue.createApp({
            // template: `

            // `,
            data() {
                return {
                    content: " ",
                    isagree: false,
                    musices: [],
                    gender: "",
                    movie:"",
                    movies:[]
                }
            },
            methods: {

            }
        })
        //挂载app
        app.mount("#app")
    </script>

</body>

</html>